<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
 * 审批流业务组表
 */
class CreateStaffSettleTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('staff_settle', function (Blueprint $table) {
            $table->increments('id');
	        $table->integer('staff_id')->comment('员工id');
	        $table->string('staff_name')->comment('员工姓名');
	        $table->integer('store_id')->comment('店铺id');
	        $table->integer('store_station_id')->comment('店铺岗位id');
	        $table->string('station_name')->comment('店铺岗位名称');
	        $table->double('should_hour')->comment('应满工时')->nullable();
	        $table->double('actual_hour')->comment('实际工时')->nullable();
	        $table->double('settle_hour')->comment('结算工时')->nullable();
	        $table->double('config_hour')->comment('可配置工时')->nullable();
	        $table->double('move_hour')->comment('调动工时')->nullable();
	        $table->decimal('hour_salary')->comment('时薪')->nullable();
	        $table->double('stop_hour')->comment('中止工时')->nullable();
	        $table->double('no_standard_hour')->comment('非标准工时')->nullable();
	        $table->tinyInteger('status')->comment('结算状态')->default(1);
	        $table->decimal('standard_money')->comment('标准结算金额')->nullable();
	        $table->decimal('reward_money')->comment('奖金额度')->nullable();
	        $table->decimal('actual_money')->comment('实发金额')->nullable();
	        $table->integer('settle_id')->comment('工单ID')->nullable();
	        $table->date('max_date')->comment('最大排班日期')->nullable();
	        $table->date('min_date')->comment('最小排班日期')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('staff_settle');
    }
}
